package main

import (
	"fmt"
	. "go_data_structures_and_algorithms/system_class/section11/pojo"
)

//层级遍历就是将头节点塞入队列后取出来的同时将左节点和右节点塞入，然后再取出来再塞入就完成了

func main() {

	node1 := NewBinaryTree(0) // 根节点
	node2 := NewBinaryTree(1)
	node3 := NewBinaryTree(3)
	node4 := NewBinaryTree(4)
	node5 := NewBinaryTree(5)
	node1.Left = node2
	node1.Right = node3
	node2.Left = node4
	node2.Right = node5

	fmt.Println(CengJiBianLi(node1))
}
